<!DOCTYPE html>
<html lang="en">
{include file="public/_head"}
<script src="/static/admin/assets/js/jquery-1.11.3.min.js"></script>
<script src="/static/lib/layer/layer.js"></script>
<body class="no-skin">
<div class="main-container ace-save-state" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.loadState('main-container')
        } catch (e) {
        }
    </script>
    <div class="main-content">

        <div class="main-content-inner">
            <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon"></i>
                        <a href="#">Home</a>
                    </li>

                    <li>
                        <a href="#">Forms</a>
                    </li>
                    <li class="active">Form Elements</li>
                </ul><!-- /.breadcrumb -->

                <div class="nav-search" id="nav-search">
                    <form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off">
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
                    </form>
                </div><!-- /.nav-search -->
            </div>
            <div class="page-content">
                <div class="page-header">
                    <h1>
                        Form Elements
                        <small>
                            <i class="ace-icon fa fa-angle-double-right"></i>
                            Common form elements and layouts
                        </small>
                    </h1>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" role="form">
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 系统名称 </label>
                                <div class="col-sm-9">
                                    <input type="text" id="form-field-1" name="name" value="{$system.name}" placeholder="Username"
                                           class="col-xs-10 col-sm-5"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 地址 </label>
                                <div class="col-sm-9">
                                    <input type="text" value="{$system.address}" name="address" placeholder="Username"
                                           class="col-xs-10 col-sm-5"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 手机 </label>
                                <div class="col-sm-9">
                                    <input type="text" value="{$system.phone}" name="phone" placeholder="Username"
                                           class="col-xs-10 col-sm-5"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 邮箱 </label>
                                <div class="col-sm-9">
                                    <input type="text" value="{$system.email}" name="email" placeholder="Username"
                                           class="col-xs-10 col-sm-5"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> QQ </label>
                                <div class="col-sm-9">
                                    <input type="text" value="{$system.qq}" name="qq" placeholder="Username"
                                           class="col-xs-10 col-sm-5"/>
                                </div>
                            </div>
                            <div class="clearfix form-actions">
                                <div class="col-md-offset-3 col-md-9">
                                    <button class="btn btn-info" id="submit_data" type="button">
                                        <i class="ace-icon fa fa-check bigger-110"></i>
                                        提交
                                    </button>

                                    &nbsp; &nbsp; &nbsp;
                                    <button class="btn" type="reset">
                                        <i class="ace-icon fa fa-undo bigger-110"></i>
                                        返回
                                    </button>
                                </div>
                            </div>
                            <div class="hr hr-24"></div>
                            <div class="space-24"></div>
                        </form>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
</div><!-- /.main-container -->
<script>

    $('#submit_data').click(function () {
        $.ajax({
            url: "{:url('admin/system/index')}",
            type: 'post',
            data: $('form').serialize(),
            dataType: 'json',
            success: function (data) {
                if (data.code == 1) {
                    layer.msg(data.msg, {
                        icon: 1,
                        time: 2000
                    }, function () {
                        location.href = data.url
                    })
                } else {
                    layer.open({
                        title: '失败',
                        content: data.msg,
                        icon: 2
                    })
                }
            }
        });
        return false;
    });
</script>
</body>
</html>
